0. Hypothesis

0.1 Short rational

  • Temperature and enrichment are predicted to have dramatic impacts on food-webs

  • Stability is theoretically predicted to have an U-shape with temperature (Uszko et al. 2017), higher temperature leading to higher stability in “cold” food-webs, and to lower stability in “hot” food-webs

  • Futhermore, metabolic theory predicts that higher trophic level suffer most from high temperature. Metabolic costs increase exponentially with temperature and higher trophic levels have generally higher body mass and then higher basal metabolic cost

  • Enrichment (measured here by DBO), is predicted to decrease stability by increasing the amplitude of population fluctuations (Rosenzweig 1971)

  • Insterestingly, enrichment is predicted to dampens the effect of high temperature by increasing resources thereby decreasing starvation risk due to high temperature (Tabi, Petchey, and Pennekamp 2019)

  • Stream and lakes are really different ecosystems:

    • Stream fishes are highly contrained by stream flow
    • Lakes are highly vertically stratified but offer limited opportunity for dispersal
    • Streams are horizontal stratified and offer opportunity for dispersal
  • Develop hypothesis:

    • about differences between lakes and streams…
    • about the different network metrics

 

0.2 Methods

  • Network metrics: Connectance, Max trophic level, Mean trophic level, number of nodes
  • Environment: Temperature and DBO (to detail)

 

0.3 Statistical ideas

  • Simple linear model:

\(N_i = \alpha + \beta_0F + \beta_1T_i + \beta_2T_iF + \beta_3D_i + \beta_4D_iF + \beta_5D_iT_i + \beta_6D_iT_iF + \epsilon\)

  • With:
    • \(i\): site i
    • \(N_i\): Network metric of site \(i\)
    • \(D\): DBO
    • \(T\): Temperature
    • \(F\): freshwater ecosystem type, lake or stream (logical variable ?)
    • \(\alpha\): intercept
    • \(\beta\): slope
    • \(\beta_2\), \(\beta_4\), \(\beta_5\): slope of simple interaction
      • \(\beta_2\): link between network metrics and temperature change with ecosystem type ?
      • \(\beta_4\): link between network metrics and DBO change with ecosystem type ?
      • \(\beta_5\): link between network metrics and DBO change with temperature ? (hyp enrichment and temperature compensate each other)
    • \(\beta_6\): slope of triple interaction; effect of temperature on the link between network metrics and DBO change with ecosystem type ?
  • Structural Equation Model (one for each ecosystem type ?) (Gibert 2019):

We certainly need to assess the collinearity among network descriptors in the SEM, it may be high, but it was ok in (Danet et al. 2021).

 

1. Temporal and spatial coverage

Due to biological and environmental data availability, the temporal coverage is from 2005 to 2017.
256 sampled lakes (with a total of 397 obs) and 373 sampled stream stations (with a total of 2,791 obs) were considered.

 

2. Environmental variables

Lake
Stream
variable mean sd median min max mean sd median min max
dbo (mg/L) 1.5 0.9 1.3 0.5 5.5 1.7 0.6 1.6 0.5 4.9
temperature (°C) 13.9 1.9 13.9 6.0 18.6 11.6 1.8 11.6 1.8 17.8

 

2.1. Correlation plots stream (left) and lake (right)

 

3. Food web metrics

Lake
Stream
metric mean sd median min max mean sd median min max
connectance 0.1 0.0 0.1 0.1 0.2 0.2 0.0 0.2 0.1 0.2
max trophic level 4.0 0.1 4.0 3.2 4.5 3.8 0.2 3.8 2.9 4.4
mean trophic level 3.3 0.2 3.3 2.6 4.1 3.5 0.3 3.5 2.5 4.2
number of nodes 36.4 8.7 36.0 10.0 64.0 31.9 15.0 30.0 8.0 92.0
richness 9.2 2.5 9.0 1.0 18.0 7.6 5.0 7.0 1.0 25.0

 

3.1. Correlation plots stream (left) and lake (right)

   

4. Environmental variables vs. Food web metrics

 

5. SEM: Environmental variables vs. Food web metrics

library(DiagrammeR)
library(piecewiseSEM)
library(semEff)
plot.psem <- function(
  x,
  return=FALSE,
  node_attrs = data.frame(shape = "rectangle", color = "black",
    fillcolor = "white"),
  edge_attrs = data.frame(style = "solid", color="black"),
  ns_dashed = T, alpha=0.05,
  show = "std", digits = 3, 
  add_edge_label_spaces = TRUE, ...
  ){

  #get the coefficients table
  ctab <- coefs(x)
  ctab$Response <- as.character(ctab$Response)
  ctab$Predictor <- as.character(ctab$Predictor)

  #make a nodes DF
  unique_nodes <- unique(c(ctab$Response, ctab$Predictor))
  nodes <- create_node_df(n = length(unique_nodes),
    nodes = unique_nodes,
    type = "lower",
    label = unique_nodes)
  nodes <- cbind(nodes, node_attrs)
  nodes[] <- lapply(nodes, as.character)
  nodes$id <- as.numeric(nodes$id)

  #make an edges DF
  edges <- create_edge_df(
    from = match(ctab$Predictor, unique_nodes),
    to = match(ctab$Response, unique_nodes))

  edges <- data.frame(edges, edge_attrs)
  edges[] <- lapply(edges, as.character)
  edges$id <- as.numeric(edges$id)
  edges$from <- as.numeric(edges$from)
  edges$to <- as.numeric(edges$to)
  if(ns_dashed) edges$style[which(ctab$P.Value>alpha)] <- "dashed"
  if(show == "std") edges$label = round(ctab$`Std.Estimate`, digits)
  if(show == "unstd") edges$label = round(ctab$Estimate, digits)
  if(add_edge_label_spaces) edges$label = paste0(" ", edges$label, " ")

  #turn into a graph
  sem_graph <- create_graph(nodes, edges, directed=TRUE)

  if(return) return(sem_graph)

  render_graph(sem_graph, ...)

}
data_analysis <- na.omit(data_final)
ti <- lm(nbnode ~ richness + dbo + temp, data_analysis)
performance::check_collinearity(ti)
## # Check for Multicollinearity
## 
## Low Correlation
## 
##      Term  VIF Increased SE Tolerance
##  richness 1.20         1.10      0.83
##       dbo 1.07         1.03      0.94
##      temp 1.20         1.10      0.83
sem <- list(
  lm(nbnode ~ richness + dbo + temp, data_analysis),
  lm(connectance ~ richness + dbo + temp, data_analysis),
  lm(w_trph_lvl_avg ~ richness + dbo + temp, data_analysis),
  lm(max_troph_lvl ~ richness + dbo + temp, data_analysis),

  lm(richness ~ dbo + temp, data_analysis)

)
mypsem <- as.psem(sem)
plot(mypsem,
  node_attrs = data.frame(
    shape = "rectangle", fixedsize = TRUE, width = .8, color = "black",
    fillcolor = "lightgrey"),
  layout = "tree"
)
semeff <- semEff(
  sem, R = 100, seed = 13,
  parallel = "multicore", ncpus = 3, type = "parametric")
semeff
pmultigroup <- multigroup(mypsem, group = "type")
pmultigroup
## 
## Structural Equation Model of mypsem 
## 
## Groups = type [ lake, stream ]
## 
## ---
## 
## Global goodness-of-fit:
## 
##   Fisher's C = 1865.732 with P-value = 0 and on 12 degrees of freedom
## 
## ---
## 
## Model-wide Interactions:
## 
##         Response     Predictor Test.Stat DF P.Value    
##           nbnode richness:type  470555.6  1  0.7193    
##           nbnode      type:dbo  470555.6  1  0.2233    
##           nbnode     type:temp  470555.6  1  0.1902    
##      connectance richness:type       0.5  1  0.0473   *
##      connectance      type:dbo       0.5  1  0.0178   *
##      connectance     type:temp       0.5  1  0.9974    
##   w_trph_lvl_avg richness:type       0.0  1  0.4563    
##   w_trph_lvl_avg      type:dbo       0.0  1  0.0022  **
##   w_trph_lvl_avg     type:temp       0.0  1  0.2552    
##    max_troph_lvl richness:type       8.8  1  0.1089    
##    max_troph_lvl      type:dbo       8.8  1  0.0012  **
##    max_troph_lvl     type:temp       8.8  1  0.5052    
##         richness      dbo:type    1135.5  1  0.0245   *
##         richness     type:temp    1135.5  1  0.0000 ***
## 
##  richness -> nbnode constrained to the global model
##  dbo -> nbnode constrained to the global model
##  temp -> nbnode constrained to the global model
##  temp -> connectance constrained to the global model
##  richness -> w_trph_lvl_avg constrained to the global model
##  temp -> w_trph_lvl_avg constrained to the global model
##  richness -> max_troph_lvl constrained to the global model
##  temp -> max_troph_lvl constrained to the global model
## 
## ---
## 
## Group [lake] coefficients: 
## 
##         Response Predictor Estimate Std.Error   DF Crit.Value P.Value
##           nbnode  richness   2.8573    0.0212 2896   134.5593  0.0000
##           nbnode       dbo   0.1630    0.1599 2896     1.0194  0.3081
##           nbnode      temp  -0.2444    0.0576 2896    -4.2445  0.0000
##      connectance  richness  -0.0009    0.0007  105    -1.2431  0.2166
##      connectance       dbo  -0.0134    0.0021  105    -6.2638  0.0000
##      connectance      temp  -0.0010    0.0003 2896    -3.5018  0.0005
##   w_trph_lvl_avg  richness   0.0009    0.0011 2896     0.8085  0.4189
##   w_trph_lvl_avg       dbo  -0.1242    0.0238  105    -5.2128  0.0000
##   w_trph_lvl_avg      temp   0.0109    0.0030 2896     3.6130  0.0003
##    max_troph_lvl  richness   0.0125    0.0009 2896    13.8355  0.0000
##    max_troph_lvl       dbo  -0.0668    0.0154  105    -4.3436  0.0000
##    max_troph_lvl      temp   0.0080    0.0024 2896     3.2729  0.0011
##         richness       dbo  -0.0264    0.2774  106    -0.0951  0.9244
##         richness      temp   0.0468    0.1295  106     0.3613  0.7186
##   Std.Estimate      
##         0.8105 *** c
##         0.0163     c
##        -0.0525 *** c
##        -0.1023      
##        -0.5206 ***  
##        -0.0834 *** c
##         0.0093     c
##        -0.4559 ***  
##         0.0857 *** c
##         0.2072 *** c
##        -0.3911 ***  
##         0.1004  ** c
##        -0.0093      
##         0.0354      
##  
## Group [stream] coefficients: 
## 
##         Response Predictor Estimate Std.Error   DF Crit.Value P.Value
##           nbnode  richness   2.8573    0.0212 2896   134.5593  0.0000
##           nbnode       dbo   0.1630    0.1599 2896     1.0194  0.3081
##           nbnode      temp  -0.2444    0.0576 2896    -4.2445  0.0000
##      connectance  richness  -0.0029    0.0001 2787   -27.2850  0.0000
##      connectance       dbo  -0.0065    0.0008 2787    -7.9281  0.0000
##      connectance      temp  -0.0010    0.0003 2896    -3.5018  0.0005
##   w_trph_lvl_avg  richness   0.0009    0.0011 2896     0.8085  0.4189
##   w_trph_lvl_avg       dbo  -0.0293    0.0088 2787    -3.3325  0.0009
##   w_trph_lvl_avg      temp   0.0109    0.0030 2896     3.6130  0.0003
##    max_troph_lvl  richness   0.0125    0.0009 2896    13.8355  0.0000
##    max_troph_lvl       dbo   0.0137    0.0071 2787     1.9397  0.0525
##    max_troph_lvl      temp   0.0080    0.0024 2896     3.2729  0.0011
##         richness       dbo   1.1388    0.1466 2788     7.7705  0.0000
##         richness      temp   1.0230    0.0502 2788    20.3581  0.0000
##   Std.Estimate      
##         0.9504 *** c
##         0.0066     c
##        -0.0287 *** c
##        -0.4792 ***  
##        -0.1318 ***  
##         -0.059 *** c
##         0.0166     c
##        -0.0653 ***  
##         0.0707 *** c
##         0.2756 *** c
##         0.0366      
##         0.0622  ** c
##         0.1378 ***  
##         0.3610 ***  
##  
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05    c = constrained

test of difference lake/stream

pmultigroup$anovaInts %>%
  kable() %>%
  kable_styling()
Response Predictor Test.Stat DF P.Value
5 nbnode richness:type 470555.6 1 0.7193
6 nbnode type:dbo 470555.6 1 0.2233
7 nbnode type:temp 470555.6 1 0.1902
12 connectance richness:type 0.5 1 0.0473
13 connectance type:dbo 0.5 1 0.0178
14 connectance type:temp 0.5 1 0.9974
19 w_trph_lvl_avg richness:type 0.0 1 0.4563
20 w_trph_lvl_avg type:dbo 0.0 1 0.0022 **
21 w_trph_lvl_avg type:temp 0.0 1 0.2552
26 max_troph_lvl richness:type 8.8 1 0.1089
27 max_troph_lvl type:dbo 8.8 1 0.0012 **
28 max_troph_lvl type:temp 8.8 1 0.5052
32 richness dbo:type 1135.5 1 0.0245
33 richness type:temp 1135.5 1 0.0000 ***
  • Main differences:
    • Negative connectance richness in streams but not in Lake
    • Negative connectance DBO in lake but not in stream
    • Negative average trophic level DBO in lake but not in stream
    • Negative maximum trophic level DBO in lake but not in stream
    • Positive richness DBO in streams but not in lake
    • Positive richness temperature in streams but not in lake
  • std_lake_stream <- rbind(
      pmultigroup$group.coefs$lake %>%
        select(Response, Predictor, Std.Estimate) %>%
        mutate(type = "lake"),
      pmultigroup$group.coefs$stream %>%
        select(Response, Predictor, Std.Estimate) %>%
        mutate(type = "stream")
    ) %>%
    pivot_wider(names_from = "type", values_from = "Std.Estimate") %>%
    mutate(across((c("lake", "stream")), as.numeric))
    std_lake_stream %>%
      kable() %>%
      kable_styling()
    Response Predictor lake stream
    nbnode richness 0.8105 0.9504
    nbnode dbo 0.0163 0.0066
    nbnode temp -0.0525 -0.0287
    connectance richness -0.1023 -0.4792
    connectance dbo -0.5206 -0.1318
    connectance temp -0.0834 -0.0590
    w_trph_lvl_avg richness 0.0093 0.0166
    w_trph_lvl_avg dbo -0.4559 -0.0653
    w_trph_lvl_avg temp 0.0857 0.0707
    max_troph_lvl richness 0.2072 0.2756
    max_troph_lvl dbo -0.3911 0.0366
    max_troph_lvl temp 0.1004 0.0622
    richness dbo -0.0093 0.1378
    richness temp 0.0354 0.3610

    References

    Danet, Alain, Maud Mouchet, Willem Bonnaffé, Elisa Thébault, and Colin Fontaine. 2021. “Species Richness and Food-Web Structure Jointly Drive Community Biomass and Its Temporal Stability in Fish Communities.” Ecology Letters 24 (11): 2364–77. https://doi.org//10.1111/ele.13857.

    Gibert, Jean P. 2019. “Temperature Directly and Indirectly Influences Food Web Structure.” Scientific Reports 9 (1): 5312. https://doi.org/10.1038/s41598-019-41783-0.

    Rosenzweig, Michael L. 1971. “Paradox of Enrichment: Destabilization of Exploitation Ecosystems in Ecological Time.” Science 171 (3969): 385–87. https://doi.org/10.1126/science.171.3969.385.

    Tabi, Andrea, Owen L. Petchey, and Frank Pennekamp. 2019. “Warming Reduces the Effects of Enrichment on Stability and Functioning Across Levels of Organisation in an Aquatic Microbial Ecosystem.” Edited by Tadashi Fukami. Ecology Letters 22 (7): 1061–71. https://doi.org/10.1111/ele.13262.

    Uszko, Wojciech, Sebastian Diehl, Göran Englund, and Priyanga Amarasekare. 2017. “Effects of Warming on Predator-Prey Interactions - a Resource-Based Approach and a Theoretical Synthesis.” Edited by Ulrich Brose. Ecology Letters, March. https://doi.org/10.1111/ele.12755.